package cc.rengu.redp.bizimpl.upmp.service;

import cc.rengu.redp.common.domain.QueryRequest;
import cc.rengu.redp.bizimpl.upmp.domain.AreaInfo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
* @author LiuYuLiang.LL
*/
    public interface AreaInfoService extends IService<AreaInfo> {

    IPage<AreaInfo> findByPage(QueryRequest request, AreaInfo areaInfo);

    @Transactional
    void create(AreaInfo entity);

    @Transactional
    void update(AreaInfo entity);

    @Transactional
    void cancel(String id);

    @Transactional
    void delete(String[] ids);

    List<Map<String, Object>>areaInfoSelect2(String q, String regionLevel, String parentCode);

    String findNameByCode(String code);

    Map<String, Object> areaInfoSelect2List(QueryRequest request, String q);
}
